#ifndef commands_H
#define commands_H

#include <QUndoCommand>

#include "document.h"
#include "page.h"

class Page;

/**
 * A QUndoCommand that is used when a QGraphicsItem is added to a page.
 */
class RemovePageCommand : public QUndoCommand
{

public:
    /**
     * Create a new AddGraphicItemCommand to push on a QUndoStack.
     * @param page The page the item is added to.
     * @param document The document of the page.
     */
    RemovePageCommand(Page *page, Document *document);

    /**
     * Remove the page from the document.
     */
    virtual void undo();

    /**
     * Add the page to the document.
     */
    virtual void redo();

private:
    /**
     * The page to remove.
     */
    Page *m_page;

    /**
     * The document of the page.
     */
    Document *m_document;

    /**
     * The index of the page. Used when reinserting the page.
     */
    int m_pageNumber;
};

#endif
